<?php
/* * 注意此文档为UTF-8的编码.
 * Created on 2010-6-3
 *
 * @author EXT <isrn@qq.com>
 *
 */
include ('../../includes/global.php');
include ('../global.php');
include ("../power.php");

switch ($_REQUEST['op']) {
    /* 	case 'load':{
      ext_request('ok');
      break;}
     */ case 'load': {
            # iconstyle
            $path = "../img/tree/";
            $f_arr = array();
            if ($handle = opendir($path)) {
                while (false !== ( $file = readdir($handle) )) {
                    if ($file != "." && $file != ".." && $file[0] != ".") {
                        if (!is_dir($path . "/" . $file)) $f_arr[] = $file;
                    }
                }
            }
            closedir($handle);
            Tr($f_arr, 'menucls');
            # loadtreeinfo
            $tinfo = Dgd(array(
                'db' => 'd_sevenel',
                'cd' => "del!=1 and id='" . $_GET['tid'] . "'",
                'tn' => "tree",
                'limit' => '1'
                    ));
            Tr($tinfo, 'tinfo');
            Tr(json_decode($tinfo['config'], true), 'config');
            # loadptreeinfo
            $tpinfo = Dgd(array(
                'db' => 'd_sevenel',
                'cd' => "del!=1 and id='" . $tinfo['parentid'] . "'",
                'tn' => "tree",
                'limit' => '1'
                    ));
            Tr($tpinfo, 'tpinfo');
            //print_r($tinfo);

            Ts('menu/config.html');
            break; }
    default: {
            Ts('menu/tree_config.html');
            break;
        }
}
?>
